home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Taifun
/
Taifun 228 (1992-12-10)(Manewaldt, A.)(DE)(PD).zip
/
Taifun 228 (1992-12-10)(Manewaldt, A.)(DE)(PD).adf
/
ak_gen0-Library
/
Programmers
/
AK_GEN0-Lib_Reference.doc
next >
Wrap
Text File
|
1992-12-01
|
19KB
|
824 lines
AK_GEN0-Lib_Reference.doc V35.106 , 03 July 1992
(c) 1989-92 by Andreas R. Kleinert
Here is a listing of all the functions in the style of the 'RKM' :
IMPORTANT NOTE :
All Parameters are STACK-Parameters, because often there are too many
parameters, which won't fit all into the registers.
-----------------------------------------------------------------------------
NAME
AK_Screen -- Open a Screen
SYNOPSIS
struct Screen * AK_Screen(long l, long t, long w, long h,
long d, long dp, long bp, long vm,
long ty, struct TextAttr *f,
char *title, struct BitMap *cbm);
FUNCTION
Opens a screen, which has been described by the parameters.
INPUT(S)
l, t, w, h - LeftEdge, TopEgde, Width, Height of struct NewScreen
d - Depth of struct NewScreen
dp, bp - DetailPen, BlockPen of struct NewScreen
vm - ViewModes of struct NewScreen
ty - Type of struct NewScreen
f - Font of struct NewScreen
title - DefaultTitle of struct NewScreen
cbm - CustomBitMap of struct NewScreen
RESULT
A pointer to a new opened screen or NULL, if opening failed.
WARNING
Test, if the result was NULL, or not !
BUGS
-
SEE ALSO
AK_Window
-----------------------------------------------------------------------------
NAME
AK_Window -- Open a Window
SYNOPSIS
struct Window * AK_Window(long l, long t, long w, long h, long d,
long b, long idcmp, long flags,
struct Gadget *fg, struct Image *cm,
char *title, struct Screen *screen,
struct BitMap *bm, long minw, long minh,
long maxw, long maxh, long type)
FUNCTION
Opens a window, which has been described by the parameters.
INPUT(S)
l, t, w, h - LeftEdge, TopEgde, Width, Height of struct NewWindow
d, b - DetailPen, BlockPen of struct NewWindow
idcmp - IDCMPFlags of struct NewWindow
flags - Flags of struct NewWindow
fg - FirstGadget of struct NewWindow
cm - CheckMark of struct NewWindow
title - Title of struct NewWindow
screen - Screen of struct NewWindow
bm - BitMap of struct NewWindow
minw - MinWidth of struct NewWindow
minh - MinHeight of struct NewWindow
maxw - MaxWidth of struct NewWindow
maxh - MaxHeight of struct NewWindow
type - Type of struct NewWindow
RESULT
A pointer to a new opened window or NULL, if opening failed.
WARNING
Test, if the result was NULL, or not !
BUGS
-
SEE ALSO
AK_Screen
-----------------------------------------------------------------------------
NAME
AK_Menu
SYNOPSIS
struct Menu * AK_Menu(struct Menu *next, long l, long w, long flags,
char *name, struct MenuItem *item)
FUNCTION
Allocs and fills out a "Menu"-structure.
INPUT(S)
next - NextMenu of struct Menu
l - LeftEdge of struct Menu
w - Width of struct Menu
flags - Flags of struct Menu
name - MenuName of struct Menu
item - FirstItem of struct Menu
RESULT
A pointer to an initialized "Menu"-structure or NULL, if failed.
WARNING
a) First initialize the items in reverse order, then the menus in
reverse order.
b) Test, if the result was NULL, or not !
BUGS
-
SEE ALSO
AK_MenuItem, AK_SubItem
-----------------------------------------------------------------------------
NAME
AK_MenuItem
SYNOPSIS
struct MenuItem * AK_MenuItem(struct MenuItem *next, long t, long w,
long flags, long me, APTR itfi,
APTR sefi, long scut,
struct MenuItem * subi)
FUNCTION
Allocs and fills out a "MenuItem"-structure.
INPUT(S)
next - NextMenu of struct MenuItem
l - LeftEdge of struct MenuItem
t - TopEdge of struct MenuItem
w - Width of struct MenuItem
flags - Flags of struct MenuItem
me - MutualExclude of struct MenuItem
itfi - ItemFill of struct MenuItem
sefi - SelectFill of struct MenuItem
scut - Command of struct MenuItem
subi - SubItem of struct MenuItem
RESULT
A pointer to an initialized "MenuItem"-structure or NULL, if failed.
WARNING
a) First initialize the items in reverse order, then the menus in
reverse order.
b) Test, if the result was NULL, or not !
BUGS
-
SEE ALSO
AK_Menu, AK_SubItem
-----------------------------------------------------------------------------
NAME
AK_SubItem
SYNOPSIS
struct MenuItem * AK_SubItem(struct MenuItem *next, long l, long t,
long w, long flags, long me, APTR itfi,
APTR sefi, long scut,
struct MenuItem *subi)
FUNCTION
Allocs and fills out a "MenuItem"-structure (here used for a SubItem).
INPUT(S)
next - NextMenu of struct MenuItem
l - LeftEdge of struct MenuItem
t - TopEdge of struct MenuItem
w - Width of struct MenuItem
flags - Flags of struct MenuItem
me - MutualExclude of struct MenuItem
itfi - ItemFill of struct MenuItem
sefi - SelectFill of struct MenuItem
scut - Command of struct MenuItem
subi - SubItem of struct MenuItem
RESULT
A pointer to an initialized "MenuItem"-structure or NULL, if failed.
WARNING
a) SubItems have to be initialized before the main MenuItems.
b) Test, if the result was NULL, or not !
BUGS
-
SEE ALSO
AK_Menu, AK_MenuItem
-----------------------------------------------------------------------------
NAME
AK_Gadget
SYNOPSIS
struct Gadget * AK_Gadget(struct Gadget *next, long l, long t, long w,
long h, long flags, long act, long type,
APTR gadr, APTR selr, struct IntuiText *text,
APTR sp, long id)
FUNCTION
Allocs and fills out a "Gadget"-structure.
INPUT(S)
next - NextMenu of struct Gadget
l - LeftEdge of struct Gadget
t - TopEdge of struct Gadget
w - Width of struct Gadget
h - Height of struct Gadget
flags - Flags of struct Gadget
act - Activation of struct Gadget
type - GadgetType of struct Gadget
gadr - GadgetRender of struct Gadget
selr - SelectRender of struct Gadget
text - GadgetText of struct Gadget
sp - SpecialInfo of struct Gadget
id - GadgetID of struct Gadget
RESULT
A pointer to an initialized "MenuItem"-structure or NULL, if failed.
WARNING
a) Values for GadgetRender, SelectRender, GadgetText, SpecialInfo
have to be initialized before.
b) Test, if the result was NULL, or not !
BUGS
-
SEE ALSO
AK_Window, AK_Border, AK_IText, AK_StringInfo
-----------------------------------------------------------------------------
NAME
AK_StringInfo
SYNOPSIS
struct StringInfo * AK_StringInfo(long groesse, long maximum,
struct KeyMap *km)
FUNCTION
Allocs and fills out a "StringInfo"-structure, which is perhaps later
used with "AK_Gadget".
INPUT(S)
groesse - Size of the Buffer and the Undo-Buffer used by the
StringGadget
maximum - MaxChars of struct StringInfo
km - AltKeyMap of struct StringInfo (normally NULL)
RESULT
A pointer to an initialized "StringInfo"-structure or NULL, if failed.
WARNING
a) The memory with the size "groesse" has to be given free with
FreeMem later for two times :
1. StringInfo->Buffer
2. StringInfo->UndoBuffer
b) Test, if the result was NULL, or not !
BUGS
-
SEE ALSO
AK_Gadget
-----------------------------------------------------------------------------
NAME
AK_Border
SYNOPSIS
struct Border * AK_Border(long l, long t, long f, long b, long d,
long c, WORD *xy, struct Border *next)
FUNCTION
Allocs and fills out a "Border"-structure, which is perhaps later
used with "AK_Gadget", "AK_MenuItem", "AK_SubItem" or whereever else.
INPUT(S)
l - LeftEdge of struct Border
t - TopEdge of struct Border
f - FrontPen of struct Border
b - BackPen of struct Border
d - DrawMode of struct Border
c - Count of struct Border
xy - XY of struct Border
next - NextBorder of struct Border
RESULT
A pointer to an initialized "Border"-structure or NULL, if failed.
WARNING
Test, if the result was NULL, or not !
BUGS
-
SEE ALSO
AK_Gadget, AK_MenuItem, AK_SubItem, ...
-----------------------------------------------------------------------------
NAME
AK_IText
SYNOPSIS
struct IntuiText * AK_IText(long f, long b, long d, long l, long t,
struct TextAttr *font, char *text,
struct IntuiText *next)
FUNCTION
Allocs and fills out a "IntuiText"-structure, which is perhaps later
used with "AK_Gadget", "AK_MenuItem", "AK_SubItem" or whereever else.
INPUT(S)
f - FrontPen of struct IntuiText
b - BackPen of struct IntuiText
d - DrawMode of struct IntuiText
l - LeftEdge of struct IntuiText
t - TopEdge of struct IntuiText
font - ITextFont struct IntuiText
text - IText of struct IntuiText
next - NextText of struct Border
RESULT
A pointer to an initialized "IntuiText"-structure or NULL, if failed.
WARNING
Test, if the result was NULL, or not !
BUGS
-
SEE ALSO
AK_Gadget, AK_MenuItem, AK_SubItem, ...
-----------------------------------------------------------------------------
NAME
AK_GfxPrint
SYNOPSIS
void AK_GfxPrint(struct Window *w, char *text, long x, long y)
FUNCTION
Prints out a text under use of the "graphics.library" functions
"Move" and "Text".
INPUT(S)
w - a valid pointer to a window, as returned by AK_Window
text - a pointer to a null-terminated string
x - x-position for the text
y - y-position for the text
RESULT
-
WARNING
-
BUGS
-
SEE ALSO
AK_IntuiPrint
SetAPen, SetBPen (in "graphics.library")
-----------------------------------------------------------------------------
NAME
AK_IntuiPrint
SYNOPSIS
void AK_IntuiPrint(struct Window *w, char *text, long x, long y);
FUNCTION
Prints out a text under use of the "intuition.library" function
"PrintIText".
w - a valid pointer to a window, as returned by AK_Window
text - a pointer to a null-terminated string
x - x-position for the text
y - y-position for the text
RESULT
-
WARNING
-
BUGS
-
SEE ALSO
AK_GfxPrint
SetAPen, SetBPen (in "graphics.library")
-----------------------------------------------------------------------------
NAME
AK_RefreshDisp
SYNOPSIS
void AK_RefreshDisp(struct Screen *sc, struct Window *w)
FUNCTION
Cleans the Display under use of the follwing functions out of
"intuition.library" and "graphics.library" :
"SetRast()" (Window/Screen)
"RefreshWindowFrame()" (Window)
"RefreshGadgets()" (Window)
INPUT(S)
sc - a valid pointer to a screen, as returned by AK_Screen
w - a valid pointer to a window, as returned by AK_Window
RESULT
-
WARNING
Well, the Display will be erased, so it has to be rewritten with
the new (or old) information.
The gadgets and the WindowFrame are both refreshed since V35.102.
BUGS
In former versions there have been some bugs.
Since V35.102 this function seems to be fully free of bugs.
SEE ALSO
"intuition.library", "graphics.library"
-----------------------------------------------------------------------------
NAME
AK_AutoRequester
SYNOPSIS
long AK_AutoRequester(struct Window *w, char *obertext, char *jatext,
char *neintext)
FUNCTION
Opens an "AutoRequester", just like in "intuition.library" and gives
its result back.
INPUT(S)
w - a valid pointer to a window, as returned by AK_Window
obertext - a pointer to a null-terminated string (above text)
jatext - a pointer to a null-terminated string (yes-text)
neintext - a pointer to a null-terminated string (no-text)
RESULT
(l. "intuition.library", AutoRequest)
WARNING
"AutoRequest" uses IntuiTexts. "AK_AutoRequester" just uses strings.
This is the main difference you shouldn't forget.
BUGS
(l. "intuition.library", AutoRequest)
SEE ALSO
(l. "intuition.library", AutoRequest)
-----------------------------------------------------------------------------
NAME
AK_Alert
SYNOPSIS
long AK_Alert(char *text, long height)
FUNCTION
Displays an Alert at LeftEdge = 100 and TopEdge = 50 under use of the
"intuition.library" function "DisplayAlert".
INPUT(S)
text - a pointer to a null-terminated string (alert text)
height - the Height of the alert-"screen"
RESULT
TRUE for LEFT-Button, FALSE for RIGHT-Button.
Always FALSE for DEADEND_ALERTS, but this functions only produces
RECOVERY_ALERTS.
(l. "intuition.library", DisplayAlert)
WARNING
Be careful. DeadEnd-Alerts never come back.
(l. "intuition.library", DisplayAlert)
BUGS
(l. "intuition.library", DisplayAlert)
SEE ALSO
(l. "intuition.library", DisplayAlert)
-----------------------------------------------------------------------------
NAME
AK_FileRequest
SYNOPSIS
char * AK_FileRequest(long xpos, long ypos, struct Screen *fscreen,
struct Window *fwindow, long ftype)
FUNCTION
Opens the special "AK_GEN0"-Filerequester, which fully administrates
itself and just returns a pointer to a string.
Under OS >= V2.04 the "asl.library" is used for that.
INPUT(S)
x - x-position for the requester-window
y - y-position for the requester-window
fscreen - a valid pointer to a screen, as returned by AK_Screen
fwindow - a valid pointer to a window, as returned by AK_Window
ftype - the Type of the Screen "fscreen" as used with
"AK_Screen"
RESULT
A pointer to a null-terminated string (FilePath plus -Name).
WARNING
The String has to be given free after use. The length for this is
defined as "AK_FILEREQ_STRING_LEN" in the Headerfile "AK_GEN0.h".
BUGS
-
SEE ALSO
AK_ReadDir
-----------------------------------------------------------------------------
NAME
AK_ReadDir
SYNOPSIS
long AK_ReadDir(char *pathname, char **direntry, long *dirtype)
FUNCTION
This function is mainly used by "AK_FileRequest" to read the contentd
of directories.
INPUT(S)
pathname - Path of directory to read
direntry - the address of an array of at least 50 char-pointers,
which all point to a separat 40-character-array (at least)
direntry - an array of at least 50 (long) integers, which will be-
come TRUE for directories and FALSE for files.
(Other values, which are defined in the included file
are _only_ for PRIVATE use inside the FileRequester.)
RESULT
The number of entries found and read.
WARNING
Don't forget to alloc and the free the arrays !!!
BUGS
-
SEE ALSO
AK_FileRequest
-----------------------------------------------------------------------------
NAME
AK_WaitKey
SYNOPSIS
void AK_WaitKey(long rawcode)
FUNCTION
This Function waits for a special (rawcode) key, but not in a multi-
tasking conform way (direct register access).
INPUT(S)
rawcode - the RawKey-Code to wait for
RESULT
-
WARNING
Remember ! This is not multitasking-like ! (But its simple :)
BUGS
8)
SEE ALSO
Register : 0xBFEC01
:>
-----------------------------------------------------------------------------
NAME
AK_WaitLeft
SYNOPSIS
void AK_WaitLeft(void)
FUNCTION
This Function waits for the left MouseButton, but not in a multi-
tasking conform way (direct register access).
INPUT(S)
-
RESULT
-
WARNING
Remember ! This is not multitasking-like ! (But its simple :)
BUGS
8)
SEE ALSO
Register : 0xBFE001
:>
-----------------------------------------------------------------------------
NAME
AK_GetNum
SYNOPSIS
long AK_GetNum(long min, long max)
FUNCTION
Creates some kind of a random number ... :)
INPUT(S)
min - the left border for number "X"
max - the right border for number "X"
RESULT
number "X" itself.
WARNING
This function runs as long as it produces such number.
BUGS
-
SEE ALSO
-
-----------------------------------------------------------------------------